<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/webCommon/webCommon.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>作品修改</title>
<!-- 默认选中班级名称-开始 -->
<script type="text/javascript">
	$(document).ready(function() {
		$(".classIdSelect").each(function() { //循环获取所有单位编号 
			var fileId = $(this).attr("value");
			var workfileId = $("#serviceWorkFileId").attr("value");
			if (fileId == workfileId) {
				$(this).attr("selected", "selected");
			}
		});
	});
</script>
<!-- 默认选中班级名称-结束 -->
<!-- 默认选中组名名称-开始 -->
<script type="text/javascript">
	$(document).ready(function() {
		$(".studentGroupSelect").each(function() { //循环获取所有单位编号 
			var studentGroupId = $(this).attr("value");
			var studentGroup = $("#serviceWorkStudentGroupId").attr("value");
			if (studentGroupId == studentGroup) {
				$(this).attr("selected", "selected");
			}
		});
	});
</script>
<!-- 默认选中组名名称-结束 -->
<script type="text/javascript" src="plugins/layui/layui.js"></script>
<script>
	layui.use([ 'form', 'layedit', 'laydate' ], function() {
		var form = layui.form(),
			layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;
		//监听提交
		form.on('submit(tijiao)', function(data) {
			layer.alert(JSON.stringify(data.field), {
				title : '最终的提交信息'
			})
		});
	});
</script>

</head>

<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="#">首页</a></li>
			<li><a href="#">作品管理</a></li>
			<li><a href="#">修改作品信息</a></li>
		</ul>
	</div>

	<div style="margin: 15px;">
		<form class="layui-form"
			action="<%=basePath%>/sys/ServiceWork_edit.action">
			<input name="id" type="hidden" value="${serviceWork.id}"> <input
				name="workId" type="hidden" value="${serviceWork.workId}">



			<div class="layui-form-item">
				<label class="layui-form-label">作品名称</label>
				<div class="layui-input-inline">
					<input type="text" name="workName" lay-verify="workName"
						value="${serviceWork.workName }" autocomplete="off"
						placeholder="作品名称" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">作品简介</label>
				<div class="layui-input-block">
					<input type="text" class="layui-textarea" name="workProfile"
						lay-verify="workProfile" value="${serviceWork.workProfile }"
						autocomplete="off" placeholder="作品简介" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">文件名称</label>
				<div class="layui-input-inline">
					<select name="fileId" id="fileId">
						<option value="">请选择...</option>
						<s:iterator value="sysFileAllList">
							<option class="fileIdSelect" value="${fileId}" id="${fileId}">${fileName}</option>
						</s:iterator>
					</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">分组名称</label>

				<div class="layui-input-inline">
					<select name="studentGroupId" id="studentGroupId">
						<option value="">请选择...</option>
						<s:iterator value="serviceStudentGroupAllList">
							<option class="studentGroupIdSelect" value="${studentGroupId}"
								id="${studentGroupId}">${studentGroupName}</option>
						</s:iterator>
					</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">上传人</label>

				<div class="layui-input-inline">
					<select name="userId" id="userId">
						<option value="">请选择...</option>
						<s:iterator value="sysUserAllList">
							<option class="userIdSelect" value="${userId}" id="${userId}">${userName}</option>
						</s:iterator>
					</select>
				</div>
			</div>
			<!--  <element>
			<div class="layui-form-item">
				<label class="layui-form-label">上传时间</label>
				<div class="layui-input-inline">
					<input type="text" name="workStartTime" lay-verify="workStartTime"
						value="${serviceWork.workStartTime }" autocomplete="off"
						placeholder="上传时间" class="layui-input">
				</div>
			</div>
			-->
			
			<div class="layui-form-item">
				<label class="layui-form-label">上传时间</label>
				<div class="layui-input-inline" id="workStartTime">
					<input type="text" name="workStartTime" id="workStartTime"
						lay-verify="workStartTime" value="${serviceWork.workStartTime }" placeholder="yyyy-mm-dd" autocomplete="off" class="layui-input"
						onclick="layui.laydate({elem: workStartTime,istime: true,format: 'YYYY-MM-DD hh:mm:ss'})">
				</div>
			</div>
			 

			</element>
			<div class="layui-form-item">
				<label class="layui-form-label">审批意见</label>
				<div class="layui-input-inline">
					<input type="text" name="workApproverOpinion"
						lay-verify="workApproverOpinion"
						value="${serviceWork.workApproverOpinion }" autocomplete="off"
						placeholder="审批意见" class="layui-input">
				</div>
			</div>
			<!-- <div class="layui-form-item">
				<label class="layui-form-label">审批时间</label>
				<div class="layui-input-inline">
					<input type="text" name="workApproverTime"
						lay-verify="workApproverTime"
						value="${serviceWork.workApproverTime }" autocomplete="off"
						placeholder="审批时间" class="layui-input">
				</div>
			</div>
			-->
			<!-- 
			<div class="layui-form-item">
				<label class="layui-form-label">审批时间</label>
				<div class="layui-input-inline" id="workApproverTime">
					<input type="text" name="workApproverTime" id="workApproverTime"
						lay-verify="workApproverTime" value="${serviceWork.workApproverTime }" placeholder="yyyy-mm-dd"
						autocomplete="off" class="layui-input"
						onclick="layui.laydate({elem: workApproverTime,istime: true,format: 'YYYY-MM-DD hh:mm:ss'})">
				</div>
			</div>
			 -->
			<!-- 
			<div class="layui-form-item">
				<label class="layui-form-label">审批人员</label>
				<div class="layui-input-inline">
					<select name="userId" id="userId">
						<option value="">请选择...</option>
						<s:iterator value="sysUserAllList">
							<option class="userIdSelect" value="${userId}" id="${userId}">${userName}</option>
						</s:iterator>
					</select>
				</div>
			</div>
			 -->
			<div class="layui-form-item">
				<label class="layui-form-label">作品状态</label>
				<div class="layui-input-inline">
					<input name="workState" type="radio" value="0" title="未通过"
						<c:if test="${0 == serviceWork.workState}">checked="checked"</c:if> />
					<input name="workState" type="radio" value="1" title="已通过"
						<c:if test="${1 == serviceWork.workState}">checked="checked"</c:if> />
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">分数</label>
				<div class="layui-input-inline">
					<input type="text" name="workScore"
						lay-verify="workScore"
						value="${serviceWork.workScore }" autocomplete="off"
						placeholder="分数" class="layui-input">
				</div>
			</div>

			<div class="layui-form-item">
				<div class="layui-input-block">
					<button id="tijiao" class="layui-btn" lay-filter="tijiao"
						lay-submit="">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
			
		</form>
		<input name="serviceWork.fileId" type="hidden" id="serviceWorkFileId" value="${serviceWork.fileId}"/>  <!-- 用于下拉选择的读取-文件 -->
		 <input name="serviceWork.studentGroupId" type="hidden" id="serviceWorkStudentGroupId" value="${serviceWork.studentGroupId}"/>  <!-- 用于下拉选择的读取-组名 -->

	</div>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 30px;">
</body>
</html>
